# 构建方法
# docker build \
    # --build-arg user=${USER} \
    # --build-arg password="shuchengm3" \
    # -t ubuntu20_string:latest \
    # -f build_for_user.dockerfile .
#

# 请在项目根目录运行

FROM ubuntu:jammy

# ARG user
# ARG password

LABEL maintainer="zhaoshucheng"
LABEL email="shucheng.zhao@nio.com"


# 命令执行
RUN apt-get update && apt-get upgrade -y
RUN apt-get install python3 python3-dev -y
RUN apt-get install python3-pip -y
RUN apt install libasio-dev libtinyxml2-dev libssl-dev libp11-dev softhsm2 -y
RUN usermod -a -G softhsm root
RUN apt install libengine-pkcs11-openssl -y
RUN apt install net-tools
# RUN openssl engine pkcs11 -t

# 文件复制
COPY ${PWD}/side_packages /root/side_packages
COPY ${PWD}/test /root/test
COPY ${PWD}/python_install/lib/python3.10/site-packages/fastddspy /usr/lib/python3/dist-packages/
COPY ${PWD}/docker/scripts/run.sh /root/run.sh

# entry_point
ENTRYPOINT [ "/bin/bash", "/root/run.sh" ]
